﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo05.Models
{
    class Item : Common.BindableBase
    {
        public string Text { get; set; }
        public bool Truck { get; set; }

        double _X = default(double);
        public double X { get { return _X; } set { SetProperty(ref _X, value); } }

        double _Y = default(double);
        public double Y { get { return _Y; } set { SetProperty(ref _Y, value); } }

        static Random _Random = new Random((int)DateTime.Now.Ticks);
        public static Item Factory(int i = 0)
        {
            return new Models.Item
            {
                Text = i.ToString(),
                Truck = (_Random.Next(1, 40) % 2 == 0),
                X = _Random.Next(5, 455),
                Y = _Random.Next(5, 455)
            };
        }
    }
}
